package cn.dnui_lxx432.dnuifood_16110100432.model;

import cn.dnui_lxx432.dnuifood_16110100432.iface.ShopIface;
import cn.dnui_lxx432.dnuifood_16110100432.listener.OnRetrofitListener;
import cn.dnui_lxx432.dnuifood_16110100432.service.ShopService;
import retrofit2.Call;

public class ShopModel extends RetrofitBaseModel implements ShopIface {

    private ShopService service;
    public ShopModel(){
        this.service = retrofit.create(ShopService.class);
    }
    @Override
    public void getAllShops(OnRetrofitListener listener) {
        Call call = service.getAllShops();
        bindCallback(call,listener,1);

    }

    @Override
    public void getFoodByShop(String shop_id, OnRetrofitListener listener) {
    Call call = service.getFoodByShop(shop_id);
    bindCallback(call,listener,2);
    }

    @Override
    public void getShopById(String shop_id, OnRetrofitListener listener) {
        Call call = service.getShopById(shop_id);
        bindCallback(call,listener,3);
    }

    @Override
    public void userCollectShop(String collect) {

    }
}
